home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / SecalDemo / Inc / dos / dos.inc < prev    next >
Text File  |  1998-06-24  |  5KB  |  202 lines

  1. include "inc/exec/types.inc";
  2.  
  3. def DOSNAME = "dos.library";
  4.  
  5. def DOSTRUE = (-1);
  6. def DOSFALSE = (0);
  7.  
  8. def MODE_OLDFILE = 1005;
  9. def MODE_NEWFILE = 1006;
  10. def MODE_READWRITE = 1004;
  11.  
  12. def OFFSET_BEGINNING = -1;
  13. def OFFSET_CURRENT = 0;
  14. def OFFSET_END = 1;
  15. def OFFSET_BEGINING = OFFSET_BEGINNING;
  16.  
  17. def BITSPERBYTE = 8;
  18. def BYTESPERLONG = 4;
  19. def BITSPERLONG = 32;
  20. def MAXINT = $7fffffff;
  21. def MININT = $80000000;
  22.  
  23. def SHARED_LOCK = -2;
  24. def ACCESS_READ = -2;
  25. def EXCLUSIVE_LOCK = -1;
  26. def ACCESS_WRITE = -1;
  27.  
  28. struct DateStamp is
  29.   ds_Days:long;
  30.   ds_Minute:long;
  31.   ds_Tick:long;
  32. ;
  33.  
  34. def TICKS_PER_SECOND = 50;
  35.  
  36. struct FileInfoBlock is
  37.   fib_DiskKey:long;
  38.   fib_DirEntryType:long;
  39.   fib_FileName[108]:byte;
  40.   fib_Protection:long;
  41.   fib_EntryType:long;
  42.   fib_Size:long;
  43.   fib_NumBlocks:long;
  44.   fib_Date:DateStamp;
  45.   fib_Comment[80]:byte;
  46.   fib_OwnerUID:uword;
  47.   fib_OwnerGID:uword;
  48.   fib_Reserved[32]:byte;
  49. ;
  50.  
  51. def FIBB_OTR_READ = 15;
  52. def FIBB_OTR_WRITE = 14;
  53. def FIBB_OTR_EXECUTE = 13;
  54. def FIBB_OTR_DELETE = 12;
  55. def FIBB_GRP_READ = 11;
  56. def FIBB_GRP_WRITE = 10;
  57. def FIBB_GRP_EXECUTE = 9;
  58. def FIBB_GRP_DELETE = 8;
  59.  
  60. def FIBB_SCRIPT = 6;
  61. def FIBB_PURE = 5;
  62. def FIBB_ARCHIVE = 4;
  63. def FIBB_READ = 3;
  64. def FIBB_WRITE = 2;
  65. def FIBB_EXECUTE = 1;
  66. def FIBB_DELETE = 0;
  67.  
  68. def FIBF_OTR_READ = (1<<FIBB_OTR_READ);
  69. def FIBF_OTR_WRITE = (1<<FIBB_OTR_WRITE);
  70. def FIBF_OTR_EXECUTE = (1<<FIBB_OTR_EXECUTE);
  71. def FIBF_OTR_DELETE = (1<<FIBB_OTR_DELETE);
  72. def FIBF_GRP_READ = (1<<FIBB_GRP_READ);
  73. def FIBF_GRP_WRITE = (1<<FIBB_GRP_WRITE);
  74. def FIBF_GRP_EXECUTE = (1<<FIBB_GRP_EXECUTE);
  75. def FIBF_GRP_DELETE = (1<<FIBB_GRP_DELETE);
  76.  
  77. def FIBF_SCRIPT = (1<<FIBB_SCRIPT);
  78. def FIBF_PURE = (1<<FIBB_PURE);
  79. def FIBF_ARCHIVE = (1<<FIBB_ARCHIVE);
  80. def FIBF_READ = (1<<FIBB_READ);
  81. def FIBF_WRITE = (1<<FIBB_WRITE);
  82. def FIBF_EXECUTE = (1<<FIBB_EXECUTE);
  83. def FIBF_DELETE = (1<<FIBB_DELETE);
  84.  
  85. def FAULT_MAX = 82;
  86.  
  87. def BADDR(x) = ((x)<<2);
  88. def MKBADDR(x) = ((x)>>2);
  89.  
  90. struct InfoData is
  91.   id_NumSoftErrors:long;
  92.   id_UnitNumber:long;
  93.   id_DiskState:long;
  94.   id_NumBlocks:long;
  95.   id_NumBlocksUsed:long;
  96.   id_BytesPerBlock:long;
  97.   id_DiskType:long;
  98.   id_VolumeNode:long;
  99.   id_InUse:long;
  100. ;
  101.  
  102. def ID_WRITE_PROTECTED = 80;
  103. def ID_VALIDATING = 81;
  104. def ID_VALIDATED = 82;
  105.  
  106. def ID_NO_DISK_PRESENT = (-1);
  107. def ID_UNREADABLE_DISK = ($42414400);
  108. def ID_DOS_DISK = ($444f5300);
  109. def ID_FFS_DISK = ($444f5301);
  110. def ID_INTER_DOS_DISK = ($444f5302);
  111. def ID_INTER_FFS_DISK = ($444f5303);
  112. def ID_FASTDIR_DOS_DISK = ($444f5304);
  113. def ID_FASTDIR_FFS_DISK = ($444f5305);
  114. def ID_NOT_REALLY_DOS = ($4e444f53);
  115. def ID_KICKSTART_DISK = ($4b49434b);
  116. def ID_MSDOS_DISK = ($4d534400);
  117.  
  118. def ERROR_NO_FREE_STORE = 103;
  119. def ERROR_TASK_TABLE_FULL = 105;
  120. def ERROR_BAD_TEMPLATE = 114;
  121. def ERROR_BAD_NUMBER = 115;
  122. def ERROR_REQUIRED_ARG_MISSING = 116;
  123. def ERROR_KEY_NEEDS_ARG = 117;
  124. def ERROR_TOO_MANY_ARGS = 118;
  125. def ERROR_UNMATCHED_QUOTES = 119;
  126. def ERROR_LINE_TOO_LONG = 120;
  127. def ERROR_FILE_NOT_OBJECT = 121;
  128. def ERROR_INVALID_RESIDENT_LIBRARY = 122;
  129. def ERROR_NO_DEFAULT_DIR = 201;
  130. def ERROR_OBJECT_IN_USE = 202;
  131. def ERROR_OBJECT_EXISTS = 203;
  132. def ERROR_DIR_NOT_FOUND = 204;
  133. def ERROR_OBJECT_NOT_FOUND = 205;
  134. def ERROR_BAD_STREAM_NAME = 206;
  135. def ERROR_OBJECT_TOO_LARGE = 207;
  136. def ERROR_ACTION_NOT_KNOWN = 209;
  137. def ERROR_INVALID_COMPONENT_NAME = 210;
  138. def ERROR_INVALID_LOCK = 211;
  139. def ERROR_OBJECT_WRONG_TYPE = 212;
  140. def ERROR_DISK_NOT_VALIDATED = 213;
  141. def ERROR_DISK_WRITE_PROTECTED = 214;
  142. def ERROR_RENAME_ACROSS_DEVICES = 215;
  143. def ERROR_DIRECTORY_NOT_EMPTY = 216;
  144. def ERROR_TOO_MANY_LEVELS = 217;
  145. def ERROR_DEVICE_NOT_MOUNTED = 218;
  146. def ERROR_SEEK_ERROR = 219;
  147. def ERROR_COMMENT_TOO_BIG = 220;
  148. def ERROR_DISK_FULL = 221;
  149. def ERROR_DELETE_PROTECTED = 222;
  150. def ERROR_WRITE_PROTECTED = 223;
  151. def ERROR_READ_PROTECTED = 224;
  152. def ERROR_NOT_A_DOS_DISK = 225;
  153. def ERROR_NO_DISK = 226;
  154. def ERROR_NO_MORE_ENTRIES = 232;
  155. def ERROR_IS_SOFT_LINK = 233;
  156. def ERROR_OBJECT_LINKED = 234;
  157. def ERROR_BAD_HUNK = 235;
  158. def ERROR_NOT_IMPLEMENTED = 236;
  159. def ERROR_RECORD_NOT_LOCKED = 240;
  160. def ERROR_LOCK_COLLISION = 241;
  161. def ERROR_LOCK_TIMEOUT = 242;
  162. def ERROR_UNLOCK_ERROR = 243;
  163.  
  164. def RETURN_OK = 0;
  165. def RETURN_WARN = 5;
  166. def RETURN_ERROR = 10;
  167. def RETURN_FAIL = 20;
  168.  
  169. def SIGBREAKB_CTRL_C = 12;
  170. def SIGBREAKB_CTRL_D = 13;
  171. def SIGBREAKB_CTRL_E = 14;
  172. def SIGBREAKB_CTRL_F = 15;
  173.  
  174. def SIGBREAKF_CTRL_C = (1<<SIGBREAKB_CTRL_C);
  175. def SIGBREAKF_CTRL_D = (1<<SIGBREAKB_CTRL_D);
  176. def SIGBREAKF_CTRL_E = (1<<SIGBREAKB_CTRL_E);
  177. def SIGBREAKF_CTRL_F = (1<<SIGBREAKB_CTRL_F);
  178.  
  179. def LOCK_DIFFERENT = -1;
  180. def LOCK_SAME = 0;
  181. def LOCK_SAME_VOLUME = 1;
  182.  
  183. def CHANGE_LOCK = 0;
  184. def CHANGE_FH = 1;
  185.  
  186. def LINK_HARD = 0;
  187. def LINK_SOFT = 1;
  188.  
  189. def ITEM_EQUAL = -2;
  190. def ITEM_ERROR = -1;
  191. def ITEM_NOTHING = 0;
  192. def ITEM_UNQUOTED = 1;
  193. def ITEM_QUOTED = 2;
  194.  
  195. def DOS_FILEHANDLE = 0;
  196. def DOS_EXALLCONTROL = 1;
  197. def DOS_FIB = 2;
  198. def DOS_STDPKT = 3;
  199. def DOS_CLI = 4;
  200. def DOS_RDARGS = 5;
  201.  
  202.